package com.ebrothers.isns.vo;

import org.json.JSONException;
import org.json.JSONObject;

public class Answer extends DataVo {
	private static final long serialVersionUID = 1248433743631065680L;
	public String body;
	public Question question;
	public Location triggerLocation;
	public User owner;
	public String datetime;

	public void fromJson(JSONObject jsonObject) throws JSONException {
		id = jsonObject.getLong("id");
		body = jsonObject.getString("body");
		datetime = jsonObject.getString("datetime");
		owner = new User();
		owner.fromJson(jsonObject.getJSONObject("owner"));
		triggerLocation = new Location();
		triggerLocation.fromJson(jsonObject.getJSONObject("triggerLocation"));
	}
}
